<div class="page-header">
  <h1>Widgets</h1>
</div>
<ul class="list-unstyled list-inline">
  <li><a href="<%= newWidgetsPath() %>" class="btn btn-primary">Create New Widget</a></li>
</ul>

<table class="table table-striped">
  <thead>
  <th>Name</th>
    <th>&nbsp;</th>
  </thead>
  <tbody>
    <%= for (widget) in widgets { %>
      <tr>
      <td><%= widget.Name %></td>
        <td>
          <div class="pull-right">
            <a href="<%= widgetPath({ widget_id: widget.ID }) %>" class="btn btn-info">View</a>
            <a href="<%= editWidgetPath({ widget_id: widget.ID }) %>" class="btn btn-warning">Edit</a>
            <a href="<%= widgetPath({ widget_id: widget.ID }) %>" data-method="DELETE" data-confirm="Are you sure?" class="btn btn-danger">Destroy</a>
          </div>
        </td>
      </tr>
    <% } %>
  </tbody>
</table>

<div class="text-center">
  <%= paginator(pagination) %>
</div>
